import java.math.BigDecimal;

//上网套餐类 特征：上网流量、每月资费 行为：显示所有套餐信息
public class DataPlan extends PlanAbstract implements DataInterface {
    private double dataPlan;

    public DataPlan(double dataPlan, BigDecimal costPerMonth) {
        super(costPerMonth);
        this.dataPlan = dataPlan;
    }

    public double getDataPlan() {
        return dataPlan;
    }

    @Override
    public void PlanInfo() {
        System.out.println("网络套餐信息：");
        System.out.println("上网流量: " + dataPlan + "MB");
        System.out.println("每月资费：" + getCostPerMonth() + "元");
    }

    @Override
    public void DataService(double Data, SIMCard Card) {
        Card.show();
        System.out.println("使用了" + Data + "MB流量");
    }
}
